package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;

/**
 * 消息状态
 */
@EnumDescription("消息状态")
public enum InformationInforStateEnum implements DictEnum {
	//--------------------start-----------------

	/**
	 * 未读消息
	 */
	NO_READ("01", "未读消息"),

	/**
	 * 已读消息
	 */
	OVER_READ("02", "已读消息"),

	//--------------------end-------------------
	;

	private String key;

	private String value;

	InformationInforStateEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}

	@Override
	public String getKey() {
		return this.key;
	}

	@Override
	public String getValue() {
		return this.value;
	}


	/**
	 * 序列化使用
	 */
	public static class Covert extends StdConverter<String, JSONObject> {
		@Override
		public JSONObject convert(String value) {
			return DictEnum.valueOfJson(InformationInforStateEnum.class, value);
		}
	}
}
